package com.smalls.newvideotwo.view;

import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

import com.smalls.newvideotwo.R;

public class SearchLoadingDialog extends Dialog {
    private TextView tv_loading;

    public SearchLoadingDialog(Context paramContext, int style) {
        super(paramContext, style);
        View loadingView = LayoutInflater.from(paramContext).inflate(R.layout.live_loading_dialog, null);
        this.tv_loading = (TextView) loadingView.findViewById(R.id.live_loading_tv);
        Animation animation = AnimationUtils.loadAnimation(paramContext, R.anim.loading_rotate);

        ((ImageView) loadingView.findViewById(R.id.live_loading_img)).startAnimation(animation);
        setContentView(loadingView);
        getWindow().setFlags(8, 8);
    }

    public void setLoadingMsg(int paramInt) {
        this.tv_loading.setText(paramInt);
    }

    public void setLoadingMsg(String paramString) {
        this.tv_loading.setText(paramString);
    }

    public void setMsgGone() {
        this.tv_loading.setVisibility(View.VISIBLE);
    }
}
